<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" th:href="@{/css/reset.css}" type="text/css"/>
    <link rel="stylesheet" th:href="@{/css/main.css}" type="text/css"/>
    <script th:src="@{/js/jquery-1.12.4.min.js}" type="text/javascript"></script>
    <script th:src="@{/js/jquery-ui.min.js}" type="text/javascript"></script>
</head>
<body>
<div th:fragment="search">
    <div class="search_con fl">
        <form action="" method="get" target="_blank">
            <input class="input_text fl" id="searchText" placeholder="搜索商品" type="text">
            <input class="input_btn fr" th:onclick="|javascript:searchProduces()|" type="button" value="搜索">
        </form>
    </div>
    <script>
        function searchProduces() {
            var searchText = $('#searchText').val();
            if (searchText.trim()==''||searchText==undefined){
                return;
            }
            window.location.href = '/produce/search?searchText=' + searchText;
        }
    </script>
</div>

</body>
</html>